package com.yf1706.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.yf1706.bean.EmpSkillCertificate;

public interface IEmpSkillCertificateJDAO extends CrudRepository<EmpSkillCertificate, Integer>{
	public List<EmpSkillCertificate> findById(int id);
	//根据员工编号查找员工的工作履历对象集合
	/*@Query("select esc from EmpSkillCertificate esc inner join skillSetting ss "
			+ "on esc.skillSetting.skillId=ss.skillId "
			+ "inner join skillLevelSetting sls on esc.skillLevelSetting.skillLevelId=sls.skillLevelId "
			+ "where esc.emp.empId=:empId")*/
	@Query("select esc from EmpSkillCertificate esc where esc.emp.empId=:empId")
	public List<EmpSkillCertificate> findByEmpId(@Param("empId")int empId);
}
